package com.msb.nacos.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/****************************************************
 *
 * @author lbf
 * @date 2025/6/16 10:27
 ****************************************************/
@RestController
@RequestMapping("/msb")
public class NacosTestController {

    @Value("${server.port}")
    public String serverPort;

    @GetMapping("/test")
    public String test(){
        return "hello "+serverPort;
    }

    @GetMapping("/c")
    public String custom(){
        return "custom "+serverPort;
    }

    @GetMapping("/login/{name}")
    public String login(@PathVariable(value = "name") String name){
        return "hello "+serverPort+"  name = "+name;
    }
}
